<template>
  <div id="app">
    <van-nav-bar
      title="套餐详情"
      left-text="返回"
      left-arrow
      @click-left="$router.go(-1)"
    />
    <!-- <div style="background:#fff;margin:10px;padding:5px 10px;font-weight:bold;font-size:14px">{{shopdetail.infotitle}}</div> -->
    <van-image width="370" height="587" :src="imginfo" />
    {{shopinfolist}}
  </div>
</template>

<script>
export default {
  // name:"app",
  data() {
    return {
      shopid: this.$route.params.id,
      shopinfolist: [],
      imginfo: "",
      shopdetail:""
    };
  },
  mounted() {
    this.$http
      .get(
        "https://www.easy-mock.com/mock/5d53cc8b8693be30424c9467/milk/shoplist"
      )
      .then(res => {
        this.shopinfolist = res.data.shoplist.filter(
          r => r.infoid === +this.shopid
        );
        this.shopdetail = this.shopinfolist[0]
        this.imginfo = this.shopdetail.infolist.img;
      });
  },
  methods: {}
};
</script>

<style scoped>
body {
  background: #f8f8f8;
}
</style>